import { Button, Tooltip } from 'antd';
import { Fragment } from 'react';
import { PlusCircleOutlined, EditOutlined, EyeOutlined } from '@ant-design/icons';
// import { stateOfRendering } from '../common';
import { history } from 'umi';
import { fieldFlowExport, getKeyRouter, getTenantID } from '@/utils';

// Table表格的配置
const getTableColumns = () => {
  return [
    // {
    //   title: '行号',
    //   visible: true,
    //   width: 50,
    //   header: '行号',
    //   render: (text: string | null, record: Record<string, any>, index: number) => `${index > 0 ? index : ''}`,
    // },
    {
      title: '资产大类',
      dataIndex: 'bigClassName',
      key: 'bigClassName',
      visible: true,
      width: 120,
      header: '资产大类',
    },
    {
      title: '期初',
      visible: true,
      header: '期初',
      children: [
        {
          title: '数量/面积',
          dataIndex: 'lastQuantityOrArea',
          key: 'lastQuantityOrArea',
          width: 150,
          visible: true,
          header: '数量/面积',
        },
        {
          title: '原值',
          dataIndex: 'lastAssetValue',
          key: 'lastAssetValue',
          width: 150,
          visible: true,
          header: '原值',
        },
        {
          title: '累计折旧',
          dataIndex: 'lastDeprecitionValue',
          key: 'lastDeprecitionValue',
          width: 150,
          visible: true,
          header: '累计折旧',
        },
        {
          title: '净值',
          dataIndex: 'lastNetValue',
          key: 'lastNetValue',
          width: 150,
          visible: true,
          header: '净值',
        },
      ]
    },
    {
      title: '本期增加',
      visible: true,
      header: '本期增加',
      children: [
        {
          title: '数量/面积',
          dataIndex: 'upQuantityOrArea',
          key: 'upQuantityOrArea',
          width: 150,
          visible: true,
          header: '数量/面积',
        },
        {
          title: '原值',
          dataIndex: 'upAssetValue',
          key: 'upAssetValue',
          width: 150,
          visible: true,
          header: '原值',
        },
        {
          title: '累计折旧',
          visible: true,
          header: '累计折旧',
          children: [
            {
              title: '合计',
              dataIndex: 'upTotal',
              key: 'upTotal',
              width: 150,
              visible: true,
              header: '合计',
            },
            {
              title: '计提折旧',
              dataIndex: 'upDeprecitionValue',
              key: 'upDeprecitionValue',
              width: 150,
              visible: true,
              header: '计提折旧',
            },
            {
              title: '补提折旧',
              dataIndex: 'buDeprecitionValue',
              key: 'buDeprecitionValue',
              width: 150,
              visible: true,
              header: '补提折旧',
            },
            {
              title: '冲减折旧',
              dataIndex: 'chDeprecitionValue',
              key: 'chDeprecitionValue',
              width: 150,
              visible: true,
              header: '冲减折旧',
            },
            {
              title: '差错调整增加',
              dataIndex: 'addDeprecitionValue',
              key: 'addDeprecitionValue',
              width: 150,
              visible: true,
              header: '差错调整增加',
            },
            {
              title: '差错调整减少',
              dataIndex: 'subDeprecitionValue',
              key: 'subDeprecitionValue',
              width: 150,
              visible: true,
              header: '差错调整减少',
            },
          ]
        },
      ]
    },
    {
      title: '本期减少',
      visible: true,
      header: '本期减少',
      children: [
        {
          title: '数量/面积',
          dataIndex: 'downQuantityOrArea',
          key: 'downQuantityOrArea',
          width: 150,
          visible: true,
          header: '数量/面积',
        },
        {
          title: '原值',
          dataIndex: 'downAssetValue',
          key: 'downAssetValue',
          width: 150,
          visible: true,
          header: '原值',
        },
        {
          title: '累计折旧',
          dataIndex: 'downtotalDeprecitionValue',
          key: 'downtotalDeprecitionValue',
          width: 150,
          visible: true,
          header: '累计折旧',
        },
      ]
    },
    {
      title: '期末',
      visible: true,
      header: '期末',
      children: [
        {
          title: '数量/面积',
          dataIndex: 'newQuantityOrArea',
          key: 'newQuantityOrArea',
          width: 150,
          visible: true,
          header: '数量/面积',
        },
        {
          title: '原值',
          dataIndex: 'newAssetValue',
          key: 'newAssetValue',
          width: 150,
          visible: true,
          header: '原值',
        },
        {
          title: '累计折旧',
          dataIndex: 'newDeprecitionValue',
          key: 'newDeprecitionValue',
          width: 150,
          visible: true,
          header: '累计折旧',
        },
        {
          title: '净值',
          dataIndex: 'newNetValue',
          key: 'newNetValue',
          width: 150,
          visible: true,
          header: '净值',
        },
      ]
    },
  ];
};

export { getTableColumns };
